
#include "main.h"
int main(void)
{
    static u8 temp = 0;
	mcu_init();
	system_init();
    start_interrupts();

    while (1)
    {
		WDT_Clear();                  
		     
        if (base_10ms_f)
        {
            base_10ms_f = false;
			light_ctrl();
            TimerNms_count();

            update_all_inputs();
            
            uart_packet_deal(&panel_comm);
            uart_packet_deal(&motor_comm);
            receive_koms_deal();
            receive_tianmao_deal();
            SWorkOnCheck();
            BWorkOnCheck();
			
            comm_err_ctrl();
            wall_deal();

			
            if(buzz_mode && (!temp))
            {
                buzz_start(buzz_mode); 
                buzz_mode = 0;
            }
			temp = buzz_mode;
			
			buzz_ctrl();	 

			steam_ctrl();
			
            board_motor_ctrl();
			smoke_motor_ctrl();
			
            tubeheat_out();
            coolwindwork_deal();
			update_all_output();
            TestProcess();
            out_drive();
			send_motor_comm();
           if(gu8_version == 0)
               send_kmos_comm();
            
        }
    }
}
